{% extends "ProjetUserBundle::layout.html.twig" %}

{% block title %}
	Profil- {{ parent() }}
{% endblock %}

{% block fos_user_content %}

{% if app.user.id == entity.id %}
	{% include "ProjetUserBundle:User:outils.html.twig" %}
{% endif %}

<div class="btn max-width"> <h2>{{ entity.nom }}  {{ entity.prenom }}</h2></div>

<table class="table">
    <tbody>
    {% if app.user.etudiant %}
    	<tr>
            <th>Pseudo privé</th>
            <td>{{ entity.pseudo }}<div class="alert alert-warning">Vous êtes le seul à le visualiser</div>
            </td>
        </tr>
    {% endif %}
        <tr>
            <th>Pseudo public</th>
            <td>{{ entity.username }}</td>
        </tr>
        
        <tr>
            <th>Adresse E-mail</th>
            <td>{{ entity.email }}</td>
        </tr>
        
        <tr>
            <th>Dernière connexion</th>
            <td>{{ entity.lastLogin|date('Y-m-d H:i:s') }}</td>
        </tr>
        
        <tr>
            <th>Sujets créés</th>
            <td>{{ entity.sujets|length }}</td>
        </tr>
        
        <tr>
            <th>Commentaire postés</th>
            <td>{{ entity.commentaires|length }}</td>
        </tr>
        
        <tr>
            <th>Vote créés</th>
            <td>{{ entity.lastLogin|date('Y-m-d H:i:s') }}</td>
        </tr>

    </tbody>
</table>

{% endblock %}